﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace decorPatternSample
{
    class Program
    {
        static void Main(string[] args)
        {
            pizza p = new peperoni();
            Console.WriteLine( p.getDesc() +" is " + p.cost());
            p = new cheese(p);
            Console.WriteLine( p.getDesc() +" is " + p.cost());
            p = new ham(p);
            Console.WriteLine(p.getDesc() + " is " + p.cost());

            pizza p1 = new hawaiian();
            Console.WriteLine(p1.getDesc() + " is " + p1.cost());
            Console.ReadKey();
        }
    }
}
